<template>
	<tm-fullView>
		<tm-menubars title="上传图片组件" color="bg-gradient-primary-lighten"  :showback="true"></tm-menubars>
		
		<tm-sheet :shadow="24">
			<view class="text-size-s text-weight-b mb-24 ">基本示例</view>
			<tm-upload  url="https://mockapi.eolinker.com/LRViGGZ8e6c1e8b4a636cd82bca1eb15d2635ed8c74e774/admin/uploadActPic/" :header="header" ref="myupload"  :filelist.sync="filelist"></tm-upload>
			
			<view class="mt-32">
				<tm-button block @click="loadimg">手动上传</tm-button>
			</view>
		</tm-sheet>
		<tm-sheet :shadow="24" >
			<view class="text-size-s text-weight-b mb-24 ">随意更改行的个数</view>
			<tm-upload  ref="testUpload" :grid="3" :filelist.sync="filelist2"></tm-upload>
			<view class="text-size-s text-weight-b my-24 ">设置为只读</view>
			<tm-upload :disabled="true" :grid="4" :filelist.sync="filelist2"></tm-upload>
		</tm-sheet>
		<tm-sheet :shadow="24"  color="blue" classname="text-size-n">
			这是一个即简单又实用的上传组件，不用复杂的配置。当然也提供了高级玩法，适合高级玩家，自己开发上传组件。详见文档
		</tm-sheet>
		
		<view style="height: 50upx;"></view>
	</tm-fullView>

</template>

<script>
	import tmFullView from "@/tm-vuetify/components/tm-fullView/tm-fullView.vue"
	import tmMenubars from "@/tm-vuetify/components/tm-menubars/tm-menubars.vue"
	import tmSheet from "@/tm-vuetify/components/tm-sheet/tm-sheet.vue"
	import tmUpload from "@/tm-vuetify/components/tm-upload/tm-upload.vue"
	import tmButton from "@/tm-vuetify/components/tm-button/tm-button.vue"
	export default {
		components:{tmFullView,tmMenubars,tmSheet,tmUpload,tmButton},
		data() {
			return {
				header:{abc:122},
				filelist:["https://picsum.photos/200?v=555","https://picsum.photos/200?v=555"],
				filelist2:[
					"https://picsum.photos/500/100?v=555",
					"https://picsum.photos/200?v=555",
					"https://picsum.photos/200?v=555",
					"https://picsum.photos/200?v=555",
					
					],
			}
		},
		methods: {
			
			loadimg(){
				let t = this;
				this.$refs.myupload.startupload();
			}
		}
	}
</script>

<style>
p{
	font-size: !important;
}
</style>
